using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;

namespace ProjectManageSystemApi.DbEntity
{

    /// <summary>
    /// 供应商产品表
    /// </summary>
    [JsonObject(MemberSerialization.OptIn), Table(Name = "supplier_goods_info", DisableSyncStructure = true)]
	public partial class SupplierGoodsInfo {

		[JsonProperty, Column(Name = "id", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 供应商id
		/// </summary>
		[JsonProperty, Column(Name = "supplier_id")]
		public int SupplierId { get; set; }

		/// <summary>
		/// 原料名称
		/// </summary>
		[JsonProperty, Column(Name = "goods_name", StringLength = 50)]
		public string GoodsName { get; set; }

		/// <summary>
		/// 原料单价
		/// </summary>
		[JsonProperty, Column(Name = "goods_price", DbType = "decimal(6,2)")]
		public decimal? GoodsPrice { get; set; }

		/// <summary>
		/// 报价日期
		/// </summary>
		[JsonProperty, Column(Name = "offer_date", DbType = "date")]
		public DateTime? OfferDate { get; set; }

		/// <summary>
		/// 送货周期(即:几天内可以送货)
		/// </summary>
		[JsonProperty, Column(Name = "delivery_cycle")]
		public int? DeliveryCycle { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "create_time")]
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 创建用户
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 20)]
		public long CreateUser { get; set; }

		/// <summary>
		/// 状态(0正常1删除)
		/// </summary>
		[JsonProperty, Column(Name = "state", DbType = "tinyint(4)")]
		public sbyte State { get; set; }

		[Navigate(nameof(CreateUser))]
		public UserInfo UserInfo { get; set; }
	}

}
